<%@ page import="java.sql.ResultSet" %>
<%@ page import="Bean.DBBean" %>

<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/5/29
  Time: 11:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>BootStrap Table使用</title>

    <script src="Scripts/jquery-1.10.2.js"></script>


    <script src="Content/bootstrap/bootstrap.js"></script>
    <link href="Content/bootstrap/bootstrap.css" rel="stylesheet" />

    <script src="Content/bootstrap-table/bootstrap-table.js"></script>
    <link href="Content/bootstrap-table/bootstrap-table.css" rel="stylesheet" />
    <script src="Content/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>


    <script src="Layout.js"></script>

</head>
<body>

<div class="panel-body" style="padding-bottom:0px;">
    <div class="alert alert-success" id="eventsResult">

    </div>

    <div class="panel panel-default">
        <div class="panel-heading">查询条件</div>
        <div class="panel-body">
            <form id="formSearch" class="form-horizontal">
                <div class="form-group" style="margin-top:15px">
                    <label class="control-label col-sm-1" for="txt_search_departmentname">部门名称</label>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" id="txt_search_departmentname">
                    </div>
                    <label class="control-label col-sm-1" for="txt_search_statu">状态</label>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" id="txt_search_statu">
                    </div>
                    <div class="col-sm-4" style="text-align:left;">
                        <button type="button" style="margin-left:50px" id="btn_query" class="btn btn-primary">查询</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <div id="toolbar" class="btn-group">
        <button id="btn_add" type="button" class="btn btn-default">
            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
        </button>
        <button id="btn_edit" type="button" class="btn btn-default">
            <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>修改
        </button>
        <button id="btn_delete" type="button" class="btn btn-default">
            <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
        </button>
    </div>
    <table id="tb_student">
        <%
            while (rs.next()) {
                String studentNum = rs.getString(1);
                String studentName = rs.getString(2);
                String studentSex = rs.getString(3);
                String studentClass = rs.getString(4);
                String studentPassword = rs.getString(5);
                String studentID = rs.getString(6);
        %>
        <tr>
            <td></td>
            <td>
                <%=studentNum%>
            </td>
            <td>
                <%=studentName%>
            </td>
            <td>
                <%=studentSex%>
            </td>
            <td>
                <%=studentClass%>
            </td>
            <td>
                <%=studentPassword%>
            </td>
            <td>
                <%=studentID%>
            </td>
            <%
                }
            %>
        </tr>
    </table>
</div>

<br>
<div align="center">
    <br> <br> <br>
    <%
        out.print("数据查询成功");
    %>
</div>
<%
    rs.close();

%>
<br>
<div align="center">
    <input type="button" value="返回" onclick="javascript:window.location.href ='index.jsp';">
</div>

</body>
</html>
